package com.zcr.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @Author ZhangCuirong
 * @Date 2024/9/26 13:03
 * @description: ce
 */
@Service
@RocketMQMessageListener(topic = "test", consumerGroup = "test-consumer")
@Slf4j
public class MQListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("收到消息：" + message);
    }

}
